package com.example.mapper;

import com.example.pojo.Area;
import com.example.pojo.Product;
import org.apache.ibatis.annotations.*;

import java.util.List;
import java.util.Map;

@Mapper
public interface ProductMapper {

   @Select("select * from t_product where user_id=#{userId} and del_flag=0")
   @ResultMap("ProductResult")
   List<Product> selectByUserId(Integer userId);

   int insert(Product product);

   int batchInsert(List<Product> productList);

   int batchUpdateByAreaId(List<Area> areaList);

   int batchUpdate(List<Product> productList);
}
